img100 = new Image();
img100.src = 'http://gfx2.bryk.pl/graphics/bnschool0.gif';
img101 = new Image();
img101.src = 'http://gfx2.bryk.pl/graphics/bcschool0.gif';
img102 = new Image();
img102.src = 'http://gfx2.bryk.pl/graphics/bnschool1.gif';
img103 = new Image();
img103.src = 'http://gfx2.bryk.pl/graphics/bcschool1.gif';
img104 = new Image();
img104.src = 'http://gfx2.bryk.pl/graphics/bnschool2.gif';
img105 = new Image();
img105.src = 'http://gfx2.bryk.pl/graphics/bcschool2.gif';
img106 = new Image();
img106.src = 'http://gfx2.bryk.pl/graphics/bnschool3.gif';
img107 = new Image();
img107.src = 'http://gfx2.bryk.pl/graphics/bcschool3.gif';
img108 = new Image();
img108.src = 'http://gfx2.bryk.pl/graphics/bntop0.gif';
img109 = new Image();
img109.src = 'http://gfx2.bryk.pl/graphics/bctop0.gif';
img110 = new Image();
img110.src = 'http://gfx2.bryk.pl/graphics/bntop1.gif';
img111 = new Image();
img111.src = 'http://gfx2.bryk.pl/graphics/bctop1.gif';
function changeSchool(school)
{
	if (document.getElementById('cschoolall'))
		document.getElementById('cschoolall').style.display = 'none'
	document.getElementById('cschool0').style.display = 'none';
	document.getElementById('cschool1').style.display = 'none';
	document.getElementById('cschool2').style.display = 'none';
	document.getElementById('cschool3').style.display = 'none';
	document.getElementById('cschool' + school).style.display = '';
	document.getElementById('bschool0').className = '';
	document.getElementById('bschool1').className = '';
	document.getElementById('bschool2').className = '';
	document.getElementById('bschool3').className = '';
	document.getElementById('bschool' + school).className = 'choosen';
}

function changeTop(box)
{
	document.getElementById('ctop0').style.display = 'none';
	document.getElementById('ctop1').style.display = 'none';
	document.getElementById('ctop' + box).style.display = '';
	document.getElementById('btop0').className = '';
	document.getElementById('btop1').className = '';
	document.getElementById('btop' + box).className = 'choosen';
}

function fillCities(DOM, text, uri)
{
	document.getElementById('for_city_0').innerHTML = text;
}

var global_city;
function changeCity(region)
{
	cities = new HTMLHttpRequest('cities', fillCities);
	cities.load('/brykowisko/szkoły/cities.php?region=' + region);
}

function checkRegion()
{
	var obj = document.school['regions'];
	var i;
	var wskaznik;
	var region;
	wskaznik = 0;
	if(obj.value == '0')
	{
		document.school['regions'].className = 'text225-error';
		return false;
	}
	if(document.school['school_type'].value == '0' && document.school['city'].value == '0')
	{
		document.school['city'].className = 'text225-error';
		document.school['school_type'].className = 'text225-error';
		return false;
	}
	return true;
}

function checkClass()
{
	var obj = document.school['class'];
	if(obj.value == '-1')
	{
		document.school['class'].className = 'text200-error';
		return false;
	}
	return true;
}
